home *** CD-ROM | disk | FTP | other *** search
- on updateIVLinkBack
- global gIVState, gLinkBackMap
- set v to the frameLabel
- delete char 1 to 2 of v
- set gLinkBackMap to "LinkTo (" & QUOTE & "IV" & value(v) & QUOTE & ")" & RETURN & "goToIV " & value(gIVState)
- end
-
- on openIV
- spinCursor()
- stopAiff()
- LinkTo("IV1")
- end
-
- on TogglePause spriteNum
- global gMovieState
- set stateData to line the frame of gMovieState
- set the itemDelimiter to "|"
- set theRec to item 1 of stateData
- set startPoint to item 2 of stateData
- set the itemDelimiter to ","
- showIV(theRec)
- end
-
- on TopicClick theLine
- global gIVTopicRecs, gIVMatchRecs
- if the timer < 20 then
- exit
- end if
- if theLine = -1 then
- exit
- end if
- set theTopic to line theLine of field "Topic IV"
- if (theTopic = EMPTY) or (theTopic = " ") then
- exit
- end if
- spinCursor()
- hilite line theLine of field "Topic IV"
- set tLine to LineOffset(theTopic, field "IVTXT_Q")
- set the itemDelimiter to "|"
- put item tLine of field "IVTXT_PD" into field "Matched IV"
- set gIVMatchRecs to item tLine of field "IVTXT_PR"
- set the itemDelimiter to ","
- hilite line 999 of field "Topic IV"
- showIV(line theLine of gIVTopicRecs)
- startMouse()
- end
-
- on ivCatClick sN
- global gOnPC, gIVTopicRecs, gIVMatchRecs, gIVState
- if voidp(sN) then
- set sN to the clickOn
- end if
- if the timer < 20 then
- exit
- end if
- hiliteAnim(sN, EMPTY)
- spinCursor()
- set gIVState to sN
- set the movieRate of sprite 35 to 0
- set the visible of sprite 35 to 0
- goToIV(sN)
- end
-
- on goToIV sN
- global gOnPC, gIVTopicRecs, gIVMatchRecs, gIVState
- set sN to sN - 9
- set thePerson to line sN of field "People IV"
- set pLine to LineOffset(thePerson, field "IVTXT_P")
- set the itemDelimiter to "|"
- set gIVTopicRecs to item pLine of field "IVTXT_QR"
- set allTopics to item pLine of field "IVTXT_QD"
- set the itemDelimiter to ","
- set firstRec to item 1 of gIVTopicRecs
- set theData to line value(firstRec) of field "IVTXT_1"
- set the itemDelimiter to "|"
- set thePerson to item 1 of theData
- set theIVMovie to item 11 of theData
- set theTitle to item 12 of theData
- set the itemDelimiter to ","
- put " " into field "Topic IV"
- put thePerson & " (" & theTitle & ")" into field "IV Caption"
- put allTopics into field "Topic IV"
- resetCursor()
- startMouse()
- end
-
- on showIV theRec
- global gOnPC, gMovieState
- spinCursor()
- stopAiff()
- hidePuppets()
- pause()
- put field "IVTXT_P" into field "People IV"
- set the visible of sprite 35 to 0
- if (theRec = EMPTY) or voidp(theRec) then
- set firstOpen to 1
- spinCursor()
- repeat with z = 1 to 10
- set theData to line value(z) of field "IVTXT_1"
- if not (theData = EMPTY) then
- exit repeat
- end if
- end repeat
- else
- set theData to line value(theRec) of field "IVTXT_1"
- set firstOpen to 0
- end if
- spinCursor()
- set the itemDelimiter to "|"
- set thePerson to item 1 of theData
- set theIVMovie to item 11 of theData
- set theTitle to item 12 of theData
- set the itemDelimiter to ","
- if the frame <> label("IV" & theIVMovie) then
- spinCursor()
- set the visible of sprite 35 to 0
- if not firstOpen then
- put thePerson & " (" & theTitle & ")" into field "IV Caption"
- end if
- LinkTo("IV" & theIVMovie)
- end if
- pause()
- spinCursor()
- set the startTime of sprite 35 to 0
- set the stopTime of sprite 35 to 0
- updateStage()
- continue()
- put value(theRec) into item 1 of line the frame of gMovieState
- if not ((theRec = EMPTY) or voidp(theRec)) then
- updateIV(theRec)
- else
- resetCursor()
- end if
- end
-
- on updateIV theRec, startPoint
- global gOnPC, gMovieState, gSysVol, gMovieStartMod
- spinCursor()
- debug("R: " & theRec)
- set stateLine to the frame
- set oldState to line stateLine of gMovieState
- set the movieRate of sprite 35 to 0
- set the visible of sprite 35 to 0
- set theData to line value(theRec) of field "IVTXT_1"
- set the itemDelimiter to "|"
- set oldRec to item 1 of oldState
- set thePerson to item 1 of theData
- set sFrame to value(item 2 of theData)
- set newState to EMPTY
- put theRec into item 1 of newState
- put sFrame into item 2 of newState
- if not ((startPoint = EMPTY) or voidp(startPoint)) then
- if startPoint > 0 then
- set sFrame to value(startPoint)
- end if
- else
- if theRec = oldRec then
- set temp to item 2 of oldState
- if temp > 0 then
- set sFrame to value(temp)
- end if
- end if
- end if
- set eFrame to value(item 3 of theData)
- set theTopic to item 4 of theData
- set theID to item 5 of theData
- set eventList to item 6 of theData
- set theDesc to item 7 of theData
- set theDurSecs to item 8 of theData
- set theVolume to item 10 of theData
- set theIVMovie to item 11 of theData
- set theTitle to item 12 of theData
- set ignoreFudge to value(item 13 of theData)
- put theData & RETURN
- set the itemDelimiter to ","
- set eventItem to 1
- set nextEvent to item eventItem of eventList
- set eventFrame to word 1 of nextEvent
- delete word 1 of nextEvent
- spinCursor()
- set tempDur to the duration of cast the castNum of sprite 35
- if not ignoreFudge then
- set sFrame to sFrame + gMovieStartMod
- set eFrame to eFrame - 180
- if eFrame > tempDur then
- set eFrame to tempDur - 180
- end if
- end if
- if eFrame > tempDur then
- set eFrame to tempDur
- end if
- put sFrame && eFrame && ignoreFudge
- put eFrame && "End" after eventList
- set the movieTime of sprite 35 to sFrame
- set the visible of sprite 35 to 1
- if theVolume = EMPTY then
- set theVolume to gSysVol
- else
- set theVolume to integer(gSysVol * (float(theVolume) / float(255)))
- end if
- set the volume of sprite 35 to theVolume
- updatePalette()
- if theDesc = EMPTY then
- set theDesc to theTopic
- end if
- put thePerson & " (" & theTitle & ")" & RETURN & theDesc & " " & theDurSecs & " seconds" into field "IV Caption"
- updateStage()
- stopCursor()
- set letPass to 0
- preRollMov(35)
- set continue to 1
- repeat while continue
- if the mouseDown = 1 then
- set letPass to 1
- set the movieRate of sprite 35 to 0
- set the itemDelimiter to "|"
- put the movieTime of sprite 35 into item 2 of newState
- set the itemDelimiter to ","
- exit repeat
- end if
- set cT to the movieTime of sprite 35
- if cT >= eventFrame then
- set the movieRate of sprite 35 to 0
- if nextEvent = "End" then
- set continue to 0
- else
- set nextEvent to item eventItem of eventList
- set eventFrame to word 1 of nextEvent
- delete word 1 of nextEvent
- set the movieRate of sprite 35 to 1
- end if
- end if
- updateStage()
- end repeat
- put thePerson & " (" & theTitle & ")" into field "IV Caption"
- put newState into line stateLine of gMovieState
- resetCursor()
- end
-